package junior.db.dao.base;

import junior.db.dao.query.AbstractQuery;

/**
 * @author wubo
 * @date 2024/9/3 10:09
 */
public abstract class FilterMapperProvider {
    
    protected String doQuery(AbstractQuery param, String path) {
        return FilterSqlHelper.doQuery(param, path, null);
    }
    
    protected String doSubQuery(SubQuery param, String path) {
        return FilterSqlHelper.doSubQuery(param, path, null);
    }
    
    protected String getSelects(AbstractQuery param, String path) {
        return FilterSqlHelper.getSelects(param, path, null);
    }
    
    protected String getTable(AbstractQuery param) {
        return FilterSqlHelper.getTable(param);
    }
    
    protected String getSubQuery(SubQuery param, String path, boolean requireOuterAlias) {
        return FilterSqlHelper.getSubQuery(param, path, requireOuterAlias, null);
    }
    
    protected String getJoinQuery(AbstractQuery param, String path) {
        return FilterSqlHelper.getJoinQuery(param, path, null);
    }
    
    protected String getFilters(AbstractFilter param, String filterWord, String path) {
        return FilterSqlHelper.getFilters(param, filterWord, path, null);
    }
    
    protected String getSubQueryFilter(SubQueryFilter filter, String path) {
        return FilterSqlHelper.getSubQueryFilter(filter, path, null);
    }
    
    protected String getGroupBies(AbstractQuery<?> param) {
        return FilterSqlHelper.getGroupBies(param);
    }
    
    protected String getHavings(AbstractQuery<?> param) {
        return FilterSqlHelper.getHavings(param);
    }
    
    protected String getLimit(AbstractQuery param) {
        return FilterSqlHelper.getLimit(param.getLimit());
    }
    
}
